import asyncio

async def work(loop,t):
    print('start')
    await asyncio.sleep(t)
    print(f'after {t}s stop')
    loop.stop()

loop=asyncio.new_event_loop()
asyncio.set_event_loop(loop)
task=asyncio.ensure_future(work(loop,1))
loop.run_forever()
loop.close()
